<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <input type="text" name="" id="" placeholder="翻转字符串" v-model.trim="msg"><span>翻转为：{{newData}}</span>
    </div>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        data: {msg:""},
        methods: {},
        computed: {
          newData(){
            return this.msg.split("").reverse().join("")
          }
        },
      });
    </script>
  </body>
</html>
